System and method for manipulating enterprise application deployment descriptors

ABSTRACT

A system and method for manipulating at least one deployment descriptor, comprising a first user interface capable of rendering a hierarchical representation of the at least one deployment descriptor, wherein a component of the representation can be selected by a user; a second user interface capable of rendering a user-editable representation of the selected component; and wherein the hierarchical representation of the at least one deployment descriptor includes a logical representation of application resources.

CLAIM OF PRIORITY

[0001] This application claims priority from the following applicationswhich are hereby incorporated by reference in their entirety:

[0002] SYSTEM AND METHOD FOR MANIPULATING ENTERPRISE APPLICATIONDEPLOYMENT DESCRIPTORS, U.S. Application Serial No. 60/445,532,Inventors: Michael Kovacs, et al., filed on Feb. 6, 2003. (Attorney'sDocket No. BEAS-01301US0)

[0003] SYSTEM AND METHOD FOR MANIPULATING AND AUTOMATICALLY UPDATINGENTERPRISE APPLICATION DEPLOYMENT DESCRIPTORS, U.S. Application SerialNo. 60/445,535, Inventors: Michael Kovacs, et al., filed on Feb. 6,2003. (Attorney's Docket No. BEAS-01302US0)

COPYRIGHT NOTICE

[0004] A portion of the disclosure of this patent document containsmaterial which is subject to copyright protection. The copyright ownerhas no objection to the facsimile reproduction by anyone of the patentdocument or the patent disclosure, as it appears in the Patent andTrademark Office patent file or records, but otherwise reserves allcopyright rights whatsoever.

CROSS REFERENCES

[0005] The following publication is hereby incorporated by reference inits entirety: BEA SYSTEMS, INC., BEA WebLogic Server®: WebLogic BuilderOnline Help (Release 7.0, June 2002).

FIELD OF THE DISCLOSURE

[0006] The present invention disclosure relates to tools for deployingweb applications, and in particular, tools for manipulating webapplication deployment descriptors.

BACKGROUND

[0007] In order to deploy an application in a web server, configurationand run-time information must be provided to the web server via one ormore deployment descriptor files. Such files can describe run-timeparameters particular to a given web server implementation,configuration information for application objects including for exampleinformation pertaining to object persistence and relationships amongobjects. Deployment descriptor files are typically written eXtensibleMarkup Language (XML). Such files are often lengthy and cryptic whichmakes them difficult to decipher and edit by hand. Furthermore, theinformation contained in deployment descriptor files must be keptup-to-date to reflect changes in a corresponding application's sourcefiles. This arrangement invites error. For instance, unless users arevigilant when editing either application or deployment descriptor files,one will become unsynchronized with the other. The user may not evenrealize this until long after an application has been deployed in a webserver. Furthermore, manually editing disparate files creates anotheropportunity for error due to input errors.

BRIEF DESCRIPTION OF THE DRAWINGS

[0008]FIG. 1 is an exemplary Graphical User Interface (GUI) in oneembodiment of the invention.

[0009]FIG. 2 is an exemplary resource hierarchy in one embodiment of theinvention.

[0010]FIG. 3 is an exemplary system diagram in one embodiment of theinvention.

DETAILED DESCRIPTION

[0011] The invention is illustrated by way of example and not by way oflimitation in the figures of the accompanying drawings in which likereferences indicate similar elements. It should be noted that referencesto “an” or “one” embodiment in this disclosure are not necessarily tothe same embodiment, and such references mean at least one.

[0012] In one embodiment, an interactive tool (hereinafter referred toas “builder”) allows a user to interactively edit information indeployment descriptors for an application without having to manuallyedit the underlying files. By way of a non-limiting example, a user canadd a tag library to a web application, or add a finder method to anEntity JavaBean™ (EJB). The builder can allow the user to then test thedeployment information by validating it and deploying the application toa server. If any of an application's deployment descriptor files aremissing or defective, the builder can generate new or newly serviceabledescriptor files. In one embodiment, the web server is the BEA WebLogic®Server from BEA Systems, Inc. of San Jose, Calif. In one embodiment, anapplication can include Java™ 2 Platform, Enterprise Edition (J2EE)components. Java™, JavaBeans and the J2EE platform are available fromSun Microsystems, Inc. of San Jose, Calif.

[0013]FIG. 1 is an exemplary Graphical User Interface (GUI) in oneembodiment of the invention. In one embodiment and by way ofillustration, the GUI can be implemented using Microsoft® Windows®,available from Microsoft Corporation of Redmond, Wash. It will beapparent to those of skill in the art that other embodiments based onother GUI frameworks are within the scope and spirit of this disclosure.GUI 100 can include user-selectable resource hierarchy 102, settingspane 104, message area 106, and tool bar 108. Message area 106 can beused to display messages of import to the user, such as the result ofvalidating deployment descriptor information, messages from a webserver, etc. In one embodiment, message area 106 can containuser-selectable text and/or graphics. By way of a non-limiting example,GUI user selection can be accomplished with a mouse, tablet, keyboard,voice command, gesture, etc. Tool bar 108 can include user-selectablecontrols for directing builder to load files, validate deploymentdescriptor information, update deployment descriptor information, andsave deployment descriptor information.

[0014] In one embodiment, the builder organizes information from all ofan application's deployment descriptors into a logical hierarchy ofresources. Such a hierarchy hides the underlying complexity of thedeployment descriptor files and makes it easier for users to accessinformation by imposing an intuitive organization on the information. Inone embodiment, this hierarchy can be represented graphically asresource hierarchy 102. In one embodiment, hierarchy 102 represents ahigh-level abstraction of any Java™ archive (JAR), Web Archive (WAR),Enterprise Archive (EAR), Java™ Connector Architecture Component (RAR),and/or an exploded Java™ Enterprise module (e.g., a source directorycontaining a “META-INF” subdirectory). This allows the user to viewdeployment information in terms of the organization of the application,rather than in terms of the foreign syntax of deployment descriptorfiles. By way of a non-limiting example, one such hierarchy could beorganized as in FIG. 2.

[0015]FIG. 2 is an exemplary resource hierarchy in one embodiment of theinvention. Indented items in the figure are considered hierarchicallyinferior to less indented items. In one embodiment, and by way of anon-limiting example, the hierarchy 102 can include an EAR node 200(corresponding to an EAR file). EAR node 200 can contain at least oneWAR 202 node (corresponding to a WAR file), at least one EJB node(corresponding to an EJB file), and at least one JAR node 208-210 (eachcorresponding to a JAR file). WAR node 202 can include the followingnodes: servlets, filters, security constraints and tag library. Each ofthese nodes may further contain other nodes, and so on. Continuing theexample, EJB nodes 204 and 206 can each contain a bean name node and arelations node. The bean name node can contain the following nodes:turning, methods, resources, CMP fields, and finders. There is no limitto the number of nodes or hierarchical levels.

[0016] When a node in hierarchy 102 is selected (either by a user orprogrammatically), its associated deployment descriptor information isdisplayed in a format suitable for editing in settings pane 104. Forexample, the “Session Settings” node is selected in hierarchy 102. Assuch, settings pane 104 provides user-editable fields (e.g., 112-116)corresponding to deployment descriptor information this node. Althoughsettings pane 104 may display a single field for a given value, thatfield may map to more than one value in more than one deploymentdescriptor file. Again, this complexity is hidden from the user. In oneembodiment, mappings between fields and information in deploymentdescriptor files is disclosed in BEA SYSTEMS, INC., BEA WebLogicServer®: WebLogic Builder Online Help (Release 7.0, June 2002) which isincorporated by reference in its entirety. Settings pane 104 can includemultiple panes, if necessary, each accessible by a user-selectable tab110, button or other navigation mechanism. In another embodiment,default values for fields can be provided where reasonable.

[0017]FIG. 3 is an exemplary system diagram in one embodiment of theinvention. Although this diagram depicts objects as functionallyseparate, such depiction is merely for illustrative purposes. It will beapparent to those skilled in the art that the objects portrayed in FIG.3 can be arbitrarily combined or divided into separate software,firmware or hardware components. Furthermore, it will also be apparentto those skilled in the art that such objects, irregardless of how theyare combined or divided, can execute on the same computing device or canbe arbitrarily distributed among different computing devices connectedby a network.

[0018] In one embodiment, builder 300 can coordinate the activities ofthe other components in conjunction with GUI 100. On start up and/orwhen a user directs GUI 100 to open a source file (e.g., via tool bar108), builder can invoke XML parser 308 to parse deployment descriptorfiles for an application and create a data structure (hereinafterreferred to as “dtree”) representation there from. There are manycommercial and publicly available XML parsers. However, the embodimentsdisclosed herein are not dependent on a particular XML parser or itsresulting data structure representation of an XML document. In oneembodiment, the dtree can be a tree data structure that embodies thehierarchical relationships of nested XML statements. When a user directsthe GUI 100 to open an application module, XML parser 308 processes anycorresponding deployment descriptor files and provides the resultingdtree to builder 200. Hierarchy 102 can then be constructed from thedtree by mapping the dtree's elements to node types in hierarchy 102.

[0019] If any deployment descriptor files needed for deployment of anapplication on a web server are missing or defective, builder 300 cangenerate new descriptor files by invoking deployment descriptorgenerator 306 to process application modules (e.g., Java™ source files).Generator 306 creates a dtree based on source files it discovers in anapplication's project directory or an archive file. Builder 300 can thentake this dtree and use it to emit a set of deployment descriptor files.In one embodiment, generator 306 examines the contents of a stagingdirectory and builds standard J2EE (e.g., web.xml and ejb-jar.xml) andserver-specific deployment descriptors based on the servlet classes andEJB classes found therein. In one embodiment, deployment descriptorgenerator 306 is the ddinit tool available with the BEA WebLogic® Serverfrom BEA Systems, Inc.

[0020] A user can direct builder (e.g., via toolbar 108) to validate thedeployment descriptor information represented by hierarchy 102. In oneembodiment, builder invokes validator 302 to locate errors withindeployment descriptor files (e.g., incorrect CMP field name, etc.).Validator 302 directs compiler 304 to perform the validation. In oneembodiment, compiler 304 is the ejbc tool available with the BEAWebLogic® Server from BEA Systems, Inc. In one embodiment, when compiler304 determines that there is an error in an deployment descriptor file,it can create an Error object to store an error code and/or message, theidentifier of a node and corresponding field in the resource hierarchy102 to which the error pertains, and/or an XML type of the field. In oneembodiment, compiler 304 provides an Error object to validator 302 foreach error it encounters pertaining to deployment descriptorinformation. Error objects can be used to automatically navigatehierarchy 102 and settings pane 104 to the source of errors.

[0021] In one embodiment, validator 302 and/or compiler 304 can displayhuman-readable error messages corresponding to each error object inmessage area 106. If a user selects such message, validator 302 usinginformation in the associated Error object can cause the hierarchy 102node identified by Error object to be automatically selected. Inaddition, validator 302 can cause the node's field(s) to be displayed inpane 104. In a further embodiment, the field which is the source of theerror message can be highlighted in pane 104. In another embodiment,validator 302 can offer suggestions to the user for correcting the fieldvalue via a pop-up window or some other notification means.

[0022] In one embodiment, a user can direct builder (e.g., via toolbar108) to deploy an application in a web server. The deploy button cancause compiler 304 to compile all of the source code associated with aspecified project directory or JAR file. If no errors are detected,compiler 304 can place the EJB classes, interfaces, and deploymentdescriptor files in a JAR file, generate web server container classesfor the Entity JavaBeans™, create client-side dynamic proxies andserver-side byte code, and deploy the project to the web server.

[0023] In one embodiment, a user can direct builder 300 (e.g., viatoolbar 108) to update an application's deployment descriptorinformation to take into account changes made to application sourcefiles. In another embodiment, builder 300 can automatically update thedeployment descriptor information if it determines that applicationsource files have been modified. In one embodiment, builder 300 caninvoke XML parser 308 to create a master dtree (if one does not alreadyexist) representing the present state of the deployment descriptorfiles, and can invoke generator 306 to create a new dtree representingdeployment descriptor information based on the current state of sourcefiles in an application's project directory.

[0024] Builder 300 compares the master and new dtrees to each other. Inone embodiment, for the portions of the dtrees that represent an EARresource, builder 300 removes all modules contained within the EARresource (e.g., WARs & JARs) in the master dtree that do not also existin the new dtree. In addition, builder 300 adds modules to the masterdtree if they exist in the new dtree but not in the master dtree. Inthis fashion, the master dtree is “refreshed” based on the current stateof the project files. For the portions of the dtrees that representEJBs, builder 300 can alter the master dtree so that it has the samebean resources as the new tree. For portions of the dtrees thatrepresent WARs, builder 300 alters the master dtree so that it has thesame modules (e.g., servlets, listeners, filters, tag libraries, etc.)as the new tree. In one embodiment, builder 300 does not delete modulesfrom the master dtree WAR resources since other applications outside ofthe current application may depend on the deployment descriptors. Inthis way, changes made to application source code files can beintegrated while preserving changes made to the DD's by a builder user.Finally, builder 300 can generate new deployment descriptors from the“refreshed” master dtree.

[0025] One embodiment may be implemented using a conventional generalpurpose or a specialized digital computer or microprocessor(s)programmed according to the teachings of the present disclosure, as willbe apparent to those skilled in the computer art. Appropriate softwarecoding can readily be prepared by skilled programmers based on theteachings of the present disclosure, as will be apparent to thoseskilled in the software art. The invention may also be implemented bythe preparation of integrated circuits or by interconnecting anappropriate network of conventional component circuits, as will bereadily apparent to those skilled in the art.

[0026] One embodiment includes a computer program product which is astorage medium (media) having instructions stored thereon/in which canbe used to program a computer to perform any of the features presentedherein. The storage medium can include, but is not limited to, any typeof disk including floppy disks, optical discs, DVD, CD-ROMs, microdrive,and magneto-optical disks, ROMs, RAMs, EPROMs, EEPROMs, DRAMs, VRAMs,flash memory devices, magnetic or optical cards, nanosystems (includingmolecular memory ICs), or any type of media or device suitable forstoring instructions and/or data.

[0027] Stored on any one of the computer readable medium (media), thepresent invention includes software for controlling both the hardware ofthe general purpose/specialized computer or microprocessor, and forenabling the computer or microprocessor to interact with a human user orother mechanism utilizing the results of the present invention. Suchsoftware may include, but is not limited to, device drivers, operatingsystems, execution environments/containers, and user applications.

[0028] The foregoing description of the preferred embodiments of thepresent invention has been provided for the purposes of illustration anddescription. It is not intended to be exhaustive or to limit theinvention to the precise forms disclosed. Many modifications andvariations will be apparent to the practitioner skilled in the art.Embodiments were chosen and described in order to best describe theprinciples of the invention and its practical application, therebyenabling others skilled in the art to understand the invention, thevarious embodiments and with various modifications that are suited tothe particular use contemplated. It is intended that the scope of theinvention be defined by the following claims and their equivalents.

What is claimed is:
 1. An interactive tool for manipulating at least onedeployment descriptor, comprising: a first user interface capable ofrendering a hierarchical representation of the at least one deploymentdescriptor, wherein a component of the representation can be selected bya user; a second user interface capable of rendering a user-editablerepresentation of the selected component; wherein the hierarchicalrepresentation of the at least one deployment descriptor includes alogical representation of application resources; and wherein theinteractive tool is capable of automatically repairing a firstdeployment descriptor of the at least one deployment descriptors if thefirst deployment descriptor is defective.
 2. The interactive tool ofclaim 1, further comprising: a third user interface capable of renderingan error message.
 3. The interactive tool of claim 2 wherein: userselection of the error message can cause the second user interface torender a user-editable representation of the at least one deploymentdescriptor component that is in error.
 4. The interactive tool of claim1, further comprising: a parser capable of generating a representationof the at least one deployment descriptor; a generator capable ofcreating the at least one deployment descriptor; and a validator capableof validating the at least one deployment descriptor.
 5. The interactivetool of claim 4 wherein: the validator is capable of generating an errorwhen it encounters a syntactic or semantic fault in the at least onedeployment descriptor.
 6. The interactive tool of claim 1, furthercomprising: a builder component capable of automatically updating the atleast one deployment descriptor to reflect one or more changes in atleast one source code file.
 7. The interactive tool of claim 1 wherein:the hierarchical representation can include information pertaining to atleast one of: a Java™ archive (JAR), a Web Archive (WAR), an EnterpriseArchive (EAR), and a Java™ Connector Architecture Component (RAR). 8.The interactive tool of claim 1 wherein: the at least one deploymentdescriptor can be expressed as an Extensible Markup Language document.9. An interactive tool for manipulating at least one deploymentdescriptor, comprising: a first user interface capable of rendering ahierarchical representation of the at least one deployment descriptor,wherein a component of the representation can be selected by a user; asecond user interface capable of rendering a user-editablerepresentation of the selected component; a third user interface capableof rendering an error message; wherein the hierarchical representationof the at least one deployment descriptor includes a logicalrepresentation of application resources; and wherein user selection ofthe error message in the third user interface can cause the second userinterface to render a user-editable representation of the at least onedeployment descriptor component that is in error.
 10. The interactivetool of claim 9, further comprising: a parser capable of generating arepresentation of the at least one deployment descriptor; a generatorcapable of creating the at least one deployment descriptor; and avalidator capable of validating the at least one deployment descriptor.11. The interactive tool of claim 10 wherein: the validator is capableof generating an error when it encounters a syntactic or semantic faultin the at least one deployment descriptor.
 12. The interactive tool ofclaim 9, further comprising: a builder component capable ofautomatically updating the at least one deployment descriptor to reflectone or more changes in at least one source code file.
 13. Theinteractive tool of claim 9 wherein: the hierarchical representation caninclude information pertaining to at least one of: a Java™ archive(JAR), a Web Archive (WAR), an Enterprise Archive (EAR), and a Java™Connector Architecture Component (RAR).
 14. The interactive tool ofclaim 9 wherein: the at least one deployment descriptor can be expressedas an Extensible Markup Language document.
 15. A method for providing aninteractive tool for manipulating at least one deployment descriptor,comprising: providing a first user interface capable of rendering ahierarchical representation of the at least one deployment descriptor,wherein a component of the representation can be selected by a user;providing a second user interface capable of rendering a user-editablerepresentation of the selected component; providing a third userinterface capable of rendering an error message; wherein thehierarchical representation of the at least one deployment descriptorincludes a logical representation of application resources; and whereinuser selection of the error message in the third user interface cancause the second user interface to render a user-editable representationof the at least one deployment descriptor component that is in error.16. The method of claim 15, further comprising: providing a parsercapable of generating a representation of the at least one deploymentdescriptor; providing a generator capable of creating the at least onedeployment descriptor; and providing a validator capable of validatingthe at least one deployment descriptor.
 17. The method of claim 16wherein: the validator is capable of generating an error when itencounters a syntactic or semantic fault in the at least one deploymentdescriptor.
 18. The method of claim 15, further comprising: providing abuilder component capable of automatically updating the at least onedeployment descriptor to reflect one or more changes in at least onesource code file.
 19. The method of claim 15 wherein: the hierarchicalrepresentation can include information pertaining to at least one of: aJava™ archive (JAR), a Web Archive (WAR), an Enterprise Archive (EAR),and a Java™ Connector Architecture Component (RAR).
 20. The method ofclaim 15 wherein: the at least one deployment descriptor can beexpressed as an Extensible Markup Language document.
 21. A machinereadable medium having instructions stored thereon that when executed bya processor cause a system to: provide a first user interface capable ofrendering a hierarchical representation of the at least one deploymentdescriptor, wherein a component of the representation can be selected bya user; provide a second user interface capable of rendering auser-editable representation of the selected component; provide a thirduser interface capable of rendering an error message; and wherein thehierarchical representation of the at least one deployment descriptorincludes a logical representation of application resources.
 22. Themachine readable medium of claim 21 wherein: user selection of the errormessage in the third user interface can cause the second user interfaceto render a user-editable representation of the at least one deploymentdescriptor component that is in error.
 23. The machine readable mediumof claim 21, further comprising instructions that when executed causethe system to: provide a parser capable of generating a representationof the at least one deployment descriptor; provide a generator capableof creating the at least one deployment descriptor; and provide avalidator capable of validating the at least one deployment descriptor.24. The machine readable medium of claim 23 wherein: the validator iscapable of generating an error when it encounters a syntactic orsemantic fault in the at least one deployment descriptor.
 25. Themachine readable medium of claim 21, further comprising instructionsthat when executed cause the system to: provide a builder componentcapable of automatically updating the at least one deployment descriptorto reflect one or more changes in at least one source code file.
 26. Themachine readable medium of claim 21 wherein: the hierarchicalrepresentation can include information pertaining to at least one of: aJava™ archive (JAR), a Web Archive (WAR), an Enterprise Archive (EAR),and a Java™ Connector Architecture Component (RAR).
 27. The machinereadable medium of claim 21 wherein: the at least one deploymentdescriptor can be expressed as an Extensible Markup Language document.